.TH "ggiSetMode" 3 "2007-12-17" "libggi-current" GGI
.SH NAME
\fBggiSetMode\fR, \fBggiGetMode\fR : Set or get a mode on a visual
.SH SYNOPSIS
.nb
.nf
#include <ggi/ggi.h>

int ggiSetMode(ggi_visual_t visual, ggi_mode *tm);

int ggiGetMode(ggi_visual_t visual, ggi_mode *tm);
.fi

.SH DESCRIPTION
\fBggiSetMode\fR sets any mode (text or graphics).  It also performs mode
negotiation like \f(CWggiCheckMode(3)\fR, but if any non-\fBGGI_AUTO\fR/\fBGT_AUTO\fR
parameters are changed from the original mode, the new mode will not
be silently set.

\fBggiGetMode\fR fills out the passed \fBggi_mode(3)\fR with the parameters of
the current mode of the visual.
.SH RETURN VALUE
\fBggiSetMode\fR returns \fB0\fR if the mode is set successfully, otherwise an
\f(CWgg-error(3)\fR code.
.SH NOTES
Do not set a mode before checking it. You may be able to set up
a certain mode on one target, but not other targets.

See the example in \f(CWggiCheckMode(3)\fR.
.SH SEE ALSO
\f(CWggiCheckMode(3)\fR, \f(CWggiOpen(3)\fR, \f(CWggi_mode(3)\fR
